$(document).ready(function() {
	
	$("#formins").validate({
		rules : {
			txtInsName : {
				required : true,
				minlength : 3},
			sex : {
				required : true
				},
			txtTelp : {
				required : true,
				number : true,
				rangelength: [6, 12]
				}
		}
	});
	
	$("#formequip").validate({
		rules : {
			equipName : {
				required : true,
				minlength : 3},
			equipPrice : {
				required : true,
				number : true
			}
		},
	});
	
	$("#formgame").validate({
		rules : {
			txtGameCategoryName : {
				required : true,
				minlength : 3},
			txtGameCategoryPrice : {
				required : true,
				number : true
			}
		},
	});
	
	$("#formtools").validate({
		rules : {
			txtToolsName : {
				required : true,
				minlength : 3},
			txtToolsPrice : {
				required : true,
				number : true
			}
		},
	});

	$("#formplayer").validate({
		rules : {
			playerName : {
				required : true,
				minlength : 3},
			playerGender : {
				required : true
			},
			playerAddress : {
				required : true
			},
			playerPhone : {
				required : true,
				number : true,
				rangelength: [6, 12]
			}
		},
	});
	
	
	$("#formplaygame").validate({
		rules : {
			duration : {
				required : true
			},
			totalPrice : {
				required : true
			}
		},
	});
		
	$("#formuser").validate({
		rules : {
			txtUsername : {
				required : true
			},
			txtPassword : {
				required : true
			},
			txtC_Username : {
				required : true,
				equalTo : "#txtPassword"
			}
			
		}
	});
		
});
/*$(document).ready(function() {
	$("#formins").validate({
		rules : {
			txtInsName : {
				required : true,
				minlength : 3},
			sex : {
				required : true
				},
			txtTelp : {
				required : true
				}
		},
	});
});

$(document).ready(function() {
	$("#formequip").validate({
		rules : {
			equipName : {
				required : true,
				minlength : 3},
			equipPrice : {
				required : true
			}
		},
	});
});

$(document).ready(function() {
	$("#formgame").validate({
		rules : {
			txtGameCategoryName : {
				required : true,
				minlength : 3},
			txtGameCategoryPrice : {
				required : true
			}
		},
	});
});

$(document).ready(function() {
	$("#formtools").validate({
		rules : {
			txtToolsName : {
				required : true,
				minlength : 3},
			txtToolsPrice : {
				required : true
			}
		},
	});
});

$(document).ready(function() {
	$("#formplayer").validate({
		rules : {
			playerName : {
				required : true,
				minlength : 3},
			playerGender : {
				required : true
			},
			playerAddress : {
				required : true
			},
			playerPhone : {
				required : true
			}
		},
	});
});

$(document).ready(function() {
	$("#formplaygame").validate({
		rules : {
			duration : {
				required : true
			},
			totalPrice : {
				required : true
			}
		},
	});
});

$(document).ready(function() {
	$("#formuser").validate({
		rules : {
			txtUsername : {
				required : true
			},
			txtPassword : {
				required : true
			},
			txtC_Username : {
				required : true,
				equalTo : "#txtPassword"
			}
			
		},
		message : {
			txtC_Username : {
				required: "Please provide a password",
				equalTo: "Please enter the same password as above" 
			}			
		}
	});
});
*/